package com.nineclock.system.service;

import cn.hutool.json.JSON;
import com.nineclock.common.entity.PageResult;
import com.nineclock.message.dto.SysAllowedJoinCompanyUserDTO;
import com.nineclock.model.dto.SysCompanyUserDTO;
import com.nineclock.system.excel.ExcelMember;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

public interface SysCompanyUserService {


    List<SysCompanyUserDTO> queryCompanyUser(Long companyId, Long userId);

    List<SysCompanyUserDTO> queryCompanyMemberList();

    PageResult<SysCompanyUserDTO> members(Integer page, Integer pageSize, String keyword, Long departmentId);

    void importData(MultipartFile excelFile) throws IOException;

    /**
     * 处理解析完毕之后的员工数据, 进行数据组装及持久化操作
     * @param memberList
     */
    public void handleParsedData(List<ExcelMember> memberList);

    SysCompanyUserDTO findCompanyUserByMobile(String mobile);

    void uploadDepartmentMysql(JSON xlsxJson);


    /**
     * 审核加入企业
     * @param sysAllowedJoinCompanyUserDTO
     */
    void allowedJoinCompany(SysAllowedJoinCompanyUserDTO sysAllowedJoinCompanyUserDTO);


    /**
     * 查询考勤组列表所有企业用户信息
     * @return
     */
    List<SysCompanyUserDTO> queryAllCompanyUser();

    /**
     * 根据企业ID查询企业的主管理员信息
     * @param companyId
     * @return
     */
    public SysCompanyUserDTO queryAdminByCompanyId(Long companyId);
}
